#!/bin/sh
source "${LMD_BASE_INSTALL_SCRIPT_DIR}/global/sys_check.sh"
APP_TARGET_DIR_NAME="mediainfo"

echo "lmdprogress:10"

export CURRENT_APP_PATH="${LMD_APPS_DIR}/${APP_TARGET_DIR_NAME}"
echo $CURRENT_APP_PATH

if [ -d "$CURRENT_APP_PATH" ]; then
    echo "App Dir: "$CURRENT_APP_PATH
else
    echo "Error, App Dir dose not exist $CURRENT_APP_PATH"
    echo "lmdprogress:100"
    exit 1
fi

echo "lmdprogress:40"

if [ -d "$CURRENT_APP_PATH" ]; then
    cd "$LMD_APPS_DIR"
    echo 'remove app files'
    rm -rf "$CURRENT_APP_PATH"
    echo "lmdprogress:100"
fi

